perm filename TVRLIB.DOC[IRC,LCS] blob sn#231116 filedate 1977-03-30 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00012 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00005 00002	Currently in TVRLIB are:
C00006 00003	HELPER	Print help message
C00007 00004	GTFILN	Get a file name	(Obsolete)
C00008 00005	GETCOM	Search a list of commands and return index of commands.
C00010 00006	FORDPY	Fortran Compatable Display Routines for III and DATADISC
C00012 00007	CV	A package of conversion routines for SAIL
C00013 00008	CURSOR	FORTRAN callable light pen routines
C00014 00009	*** NEWLIB also includes: ***
C00015 00010	BLAST	Send string to each user of specific name.
C00016 00011	PASCHK	Check password for PPN
C00017 00012	APPENDIX - Character string conversion package
C00021 ENDMK
C⊗;
Currently in TVRLIB are:
HELPER
GTFILN
GETCOM
FORDPY
IIISIM
FOOCOR
CV
CURSOR
HELPER	Print help message
------

Called with:

	JSA 16,HELPER
	<address of 4 words block containing file name>
	<address of 128 words buffer>

Prints that file  on the teleype.   Currently, limited to  128 words.
(loses).
GTFILN	Get a file name	(Obsolete)
------

Called with:

	PUSH P,[<address of 6 word block>]
	PUSHJ 17,GTFILN

Reads device and file name into 7 words block in the following format:

	SIXBIT/<device>/
	<ignored>
	SIXBIT/<file name>/
	SIXBIT/<extension>/
	<ignored>
	SIXBIT/<ppn>/


This format is suitable for use with the OPEN and LOOKUP UUOs.  It
occasionally gets confused by strange characters.
GETCOM	Search a list of commands and return index of commands.
------

Two flavors:

SAIL:  EXTERNAL  STRING  PROCEDURE  GET_COMMAND(STRING  COMMAND_LIST,
		SEARCH_STRING);

FAIL:

	PUSH 17,[ASCIZ/<command list>/]
	PUSH 17,[<length of command list>]
	PUSH 17,[ASCIZ/<search string>/]
	PUSH 17,[<length of search string>]
	PUSHJ 17,GETCOM

Takes a special list of commands delimited  by the first character in
the  string  and a  search string  and  returns index  (in  number of
commands) in  that  string  which  match  or a  number  less  that  1
reporting failure. The failures returns mean:

 0	Does not match
-1	Ambiguous string
-2	Bad list

An example of a command list is
	ASCIZ/,APPEND,DELETE,EXIT,HELP,INSERT,QUIT/

FORDPY	Fortran Compatable Display Routines for III and DATADISC
------

This package is equivalent to the LIB40 version except that it
also converts III display buffers for the DATADISC.  In addition
the function DDCLR has been added to clear the display without
moving the page printer. SAIL compatable (see IIISIM if you are
using a program which does not use CORGET and CORREL), and calls
IIISIM.  See DISPLY.RBN[UP,DOC] for details.


IIISIM	III Simulator for DATADISC
------

The routine takes the same header as UPGIOT  and simulated the III to
produce  DATADISC output.   Note  that if there  is no  such routines
called CORGET and CORREL  loaded when TVRLIB is  seen,  a CORGET  and
CORREL routine  will be  loaded from the  module called  FOOCOR which
allocates  a block of storage starting at  JOBFF and updates JOBFF in
the same way a the  system does when allocating I/O buffers.   CORREL
does the same thing as  RELEASE (that is it reset JOBFF, but does not
core down).
CV	A package of conversion routines for SAIL
--

STRING PROCEDURE CVFSTR(INTEGER FILE,EXT,PPN);	! Converts SIXBIT to a string;
STRING PROCEDURE TRIM(STRING S);		! Flushes trailing blanks;
STRING PROCEDURE CVDATE(INTEGER N);;		! Converts system format date;
						! into a string, as 12-JAN-73;
STRING PROCEDURE CVK(INTEGER N);		! Converts 123456 to "123,456";
CURSOR	FORTRAN callable light pen routines

SETCUR(XPOS,YPOS,VIS) 	TURNS ON THE CURSOR AT (XPOS,YPOS). DRAW VECTOR IF
			VIS≠0
CLRCUR		  	TURNS OFF THE CURSOR
RDCUR(XPOS,YPOS)  	READ THE POSITION OF THE CURSOR (XPOS & YPOS ARE
			INTEGERS)
SLEEP(N)		SLEEPS FOR N SECONDS WHERE N IS AN INTEGER
			(IF N=0 SLEEPS FOR 1/60 SECOND)
*** NEWLIB also includes: ***
BLAST	Send string to each user of specific name.
-----
	PUSH 17,[SIXBIT/<project-programmer name>/]
	PUSH 17,[ASCIZ/<string>/]
	PUSHJ 17,BLAST

Sends string to each user logged of given name.  Returns in AC 1
the number of messages successfully sent.

PASCHK	Check password for PPN
------
	PUSH 17,[SIXBIT/<project-programmer name>/]
	PUSHJ 17,PASCHK

Inputs password from console and return -1 if password matches with that
in the UFD and zero if it does not match or UFD is missing.  Does not
affect I/O channels. [It pushs and pops channel 17].
APPENDIX - Character string conversion package

(See CONVRT.FAI[1,TVR] for latest information.)

This  package   is  a  collection   of  frequently   used  conversion
subroutines, such as  convert integer to character stream and convert
character  stream  to  sixbit.    The  character  stream   source  or
destination  are   defined  by  a   PDP-10  instruction,     such  as
PUSHJ P,GETCHR.   All  character stream destinations  are expected to
return  a  character  in  accumulator  1  and  all  character  stream
destination are  expected to recieve its character  in accumulator 1.
Subroutines which return arguments  always return their arguments  in
accumulator 1 and  if a break character is  to be return, it  will be
in accumulator  0.   Character streams  should not  modify any  other
accumulators.  These subroutines are:


RDINT(Integer BASE; Character_source OPCODE);
   Convert character stream into integer, in specified base.

WRINT(Integer N, BASE; Character_destination OPCODE);
   Convert integer into character stream, in specified base.

WROCT(Integer N, NDIGITS; Character_destination OPCODE);
   Convert NDIGITS low order digits of octal number into character
   stream.

RDSIX(Integer SIXBIT; Character_source OPCODE, Breaktable BRKTAB);
   Convert sixbit word into character stream.

WRSIX(Integer SIXBIT; Character_destination OPCODE);
   Convert sixbit word into character stream.

RDFLO(Operation OPCODE);
   Convert character stream into real, in specified base. (UNIMPLIMENTED)

WREFLO(Real N,CHARACTER_COUNT,CONTROL_WORD; Character_destination
	 OPCODE);
 Convert  floating point  number into  character stream of  specified
format.   CONTROL_WORD is of  form. (See FORTRAN for  details on this
format).
	XWD <characters to left of decimal point>,<width of field>

RDFILN(Array FILBLK; Character_source OPCODE; Sixbit
	DEFAULT_EXTENSION)
   Convert a character string into system file name structure.

WRFILN(Array FILBLK; Character_destination OPCODE)
   Convert system file name structure into a character string.

WRASCZ(Ascizstring S; Character_destination OPCODE)

A  break  table  is  the  standard  system  format  four  word  table
representing which  characters are break characters.   See UUO Manual
for details.  Briefly,

	Word 0 contains bits for <null> thru #,
	Word 1 contains bits for $ thru G,
	Word 2 contains bits for H thru k
	Word 3 contains bits for l thru <bs>